<?php
/*
* Copyright (c) 2010 by Cediti
*
* You may distribute under the terms of either the GNU Lesser General
* Public License or the new BSD License, as specified in the README file.
*/
// created :	01/04/2010
// version :	02/04/2010

interface Cmis_Client_Services_Interface
{
	/**
	 * Constructor
	 * @param Cmis_Request_Interface $protocol
	 * @param string $endpoint
	 * @param string $type cmis repository type
	 * @return Cmis_Client_Services
	 */
	public function __construct(Cmis_Request_Interface $protocol,  $endpoint, $type = 'Generic');

	/**
	 * Define the entry url to call CMIS services
	 * @param string $url
	 * @return Cmis_Client_Services
	 */
	public function setEndpoint($url);

	/**
	 * Return the base url for cmis services
	 * @return String
	 */
	public function getEndpoint();

	/**
	 * Check if we have more than 1 repositories for the endpoint entry
	 * @return bool
	 */
	public function hasMultipleRepository();

	/**
	 * @return Cmis_Request_Interface
	 */
	public function getProtocol();

	//
	// Services access
	//

	/**
	 * Define the service associated to the serviceName
	 * @param string $serviceName name of the service to set
	 * @param Cmis_Services_Interface $services service object
	 * @return Cmis_Client_Services
	 */
    public function setService($service_name, Cmis_Services_Interface $services);

	/**
	 * Get the service corresponding to the service name
	 * @param string $service_name
	 * @return Cmis_Services_Interface null if not found
	 */
	public function getService($service_name);

    /**
     * Define the service protocol associated to the serviceName
     * @param string $serviceName name of the service to set
     * @param Cmis_Services_Protocol_Interface $services service object
     * @return Cmis_Client_Services
     */
    public function setProtocolService($service_name, Cmis_Services_Protocol_Interface $services);

	/**
	 * Get the service protocol corresponding to the service name
	 * @param string $service_name
	 * @return Cmis_Services_Protocol_Interface null if not found
	 */
	public function getProtocolService($service_name);
}

# EOF
